FROM python:3.11-slim-buster
WORKDIR /app
COPY . .
ENV PYTHONPATH "${PYTHONPATH}:/your/custom/path"
RUN pip3 install -r requirements.txt  -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
RUN rm /etc/apt/sources.list 
RUN cp sources.txt /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y gcc
RUN pip3 install uwsgi  -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
RUN apt-get purge -y gcc
RUN mkdir /app/log
RUN touch /app/log/uwsgi.log
# CMD [ "python3","project/manage.py","runserver","0.0.0.0:8000" ]
CMD [ "uwsgi","--ini","/app/project/uwsgi.ini" ]